package cn.cyl.pet.domain;


import cn.cyl.basic.domain.BaseDomain;
import cn.cyl.org.domain.Shop;
import cn.cyl.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 实体类：
 */
@Data
public class Pet extends BaseDomain {

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private String resources;
    /**
     * 状态：0下架 1上架
     */
    private Integer state;

    @JsonFormat(pattern = "yyyy:MM:dd",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy:MM:dd",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy:MM:dd",timezone = "GMT+8")
    private Date createtime=new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;

    private Long searchMasterMsgId;

    /**
     * 显示猫的品种
     */
    private PetType petType;

    /**
     * 用来显示店铺
     * @return
     */
    private Shop shop;

    /**
     * 用来显示用户
     * @return
     */
    private User user;

    //1.列表查询的时候将详情信息查询出来  2.在添加和修改的时候接收前端传递的数据
    private PetDetail petDetail;


}
